﻿namespace JMDict.ObjectModel
{
    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    using System.Xml.Serialization;

    /// <summary>
    /// The entry class.
    /// Entries consist of kanji elements, reading elements, general information 
    /// and sense elements. 
    /// Each entry must have at least one reading element and one sense element. 
    /// Others are optional.
    /// </summary>
    [DataContract]
    public class Entry
    {
        /// <summary>
        /// Gets or sets a unique numeric sequence number for each entry.
        /// </summary>
        [XmlElement("ent_seq")]
        public string Id
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the kanjis of the entry.
        /// </summary>
        [XmlElement("k_ele")]
        public List<Kanji> Kanjis
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the reading elements of the entry.
        /// </summary>
        [XmlElement("r_ele")]
        public List<ReadingElement> ReadingElements
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the Info.
        /// </summary>
        [XmlElement("Info")]
        public Info Info
        {
            get;
            set;
        }
        
        [XmlElement("sense")]
        public List<Sense> Senses
        {
            get;
            set;
        }
    }
}